<style>
    td {
        padding: 10px 5px;
    }

    p {
        margin: 0 0 0px;
    }
    table{
        border-spacing: 1px;
    }
    .tdborder{
        border:1px solid #000000;
       align-items:center;line-height:16px;
    }
    .tdtext{
        text-align:center;
        vertical-align:middle;
    }
    .title{
        padding: 0px;
        font-weight: bold;
        text-align: center;
    }
    .pcontent{
        padding: 0px;
        text-align: center;
    }
</style>
<table border="0" cellspacing="0" width="400" style="table-layout:fixed;word-break:break-all; word-wrap:break-all;"  >
    <tbody>
    <tr>
        <td width="743" valign="center" colspan="8" >
            <p  style="text-align:center;vertical-align:middle;">
            <b><span style="color:#0070C0;font-size:18pt;">合 &nbsp;&nbsp;&nbsp;同</span></b>
                <br/>
            <b><span style="color:#0070C0;font-size:16pt;">{$row.name|htmlentities}</span></b>
            </p>
        </td>

    </tr>

    <tr>
        <td valign="center" colspan="5" >
            <p  style="vertical-align:middle;">
                <b>&nbsp;合同编号：{:htmlentities($row.number?$row.number:$row.id)} </b>
            </p>
        </td>
        <td >
            <p  style="vertical-align:middle;">
            <b>下单日期：</b>
        </p>
        </td>
        <td colspan="2" >
            <p  style="vertical-align:middle;">
            <b>{:datetime($row.order_time,'Y-m-d')}</b>
            </p>
        </td>

    </tr>

    <tr>
        <td class="tdborder">
            <p class="tdtext" >
                <b>客户名称</b>
            </p>
        </td>
        <td valign="center" colspan="3" class="tdborder">
            <p class="tdtext" >
                {$row.customer.name|htmlentities}
            </p>
        </td>
        <td valign="center" class="tdborder">
            <p class="tdtext">
                <b>联系人</b>

            </p>
        </td>
        <td   colspan="3" class="tdborder">
            <p class="tdtext" >
                {$row.contacts?htmlentities($row.contacts.name):''}
            </p>
        </td>

    </tr>

    <tr>
        <td class="tdborder">
            <p class="tdtext">
                <b>项目经理</b>
            </p>
        </td>
        <td colspan="3" class="tdborder" >
            <p class="tdtext" >

            </p>
        </td>
        <td class="tdborder">
            <p class="tdtext" >
            <b>签单人</b>
            </p>
        </td>
        <td  colspan="3" class="tdborder">
            <p class="tdtext" >
                {$row.orderAdmin.nickname|htmlentities}
            </p>
        </td>


    </tr>


    <tr>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>开始日期</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                {:datetime($row.start_time,'Y/m/d H:s')}
            </p>
        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("结束日期")}</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                {:datetime($row.end_time,'Y/m/d H:s')}
            </p>
        </td>
    </tr>


    <tr>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("合同金额")}</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <b><span style="color:#0070C0;font-size:16pt;">{$row.money|htmlentities}</span></b>

        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("已收款")}</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                {$row.return_money|htmlentities}
            </p>
        </td>
    </tr>
    <tr>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("备注")}</b></p>
        </td>
        <td  colspan="6" class="tdborder">
            <p class="tdtext" >
                {$row.remark|htmlentities}
            </p>
        </td>

    </tr>


    <tr>
        <td valign="center" rowspan="{:count($row.product)+1}" class="tdborder" >
            <p >
                <b>
                    <div style="width: 20px;margin-left: 15px;">{:__("购买产品或服务")}</div>
                </b>
            </p>
        </td>
        <td  class="tdborder title">

            <b>{:__("名称")}</b>
        </td>
        <td class="tdborder title" >
            <b>{:__("编码")}</b>
        </td>
        <td class="tdborder title" >
            <b>{:__("数量")}</b>
        </td>
        <td class="tdborder title" >
            <b>{:__("单位")}</b>
        </td>
        <td  class="tdborder title">
            <b>{:__("单价")}</b>
            </p>
        </td>
        <td class="tdborder title">
            <b>{:__("小计")}</b>
        </td>
        <td class="tdborder title">
            <b>{:__("备注")}</b>
        </td>
        </td>
    </tr>

    {volist name="row.product" id="vo" }
    <tr>
        <td  class="tdborder" >
            <p>
            <b>{:$vo.name|htmlentities}</b>
            </p>
        </td>
        <td  class="tdborder pcontent">
            {$vo.sku|htmlentities}
        </td>
        <td  class="tdborder pcontent">
            {$vo.nums|htmlentities}
        </td>
        <td  class="tdborder pcontent">
            {$vo.unit|htmlentities}
        </td>
        <td  class="tdborder pcontent">
            ￥{$vo.price|htmlentities}
        </td>
        <td  class="tdborder pcontent">
            ￥{$vo.price*$vo.nums}
        </td>
        <td  class="tdborder pcontent">
              {$vo.remarks|htmlentities}
        </td>
    </tr>
    {/volist}

    <tr>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("产品金额")}</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <b><span style="">{$row.total_price|htmlentities}</span></b>

        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                <b>{:__("折扣")}</b></p>
        </td>
        <td  colspan="2" class="tdborder">
            <p class="tdtext" >
                {$row.discount_rate|htmlentities}
            </p>
        </td>
    </tr>



    <tr>
        <td colspan="4" >
            <p  style="text-align:left;vertical-align:middle;">


                <b><span style="font-size:14pt;">{:__("甲方")}</span></b>
                <br/>
                <br/>
                <b><span >{:__("盖章签名")}：_____________</span></b>
                <br/>
                <br/>
                <b><span >{:__("日期")}：</span></b>
            </p>
        </td>

        <td colspan="4" >
            <p  style="text-align:left;vertical-align:middle;">


                <b><span style="font-size:14pt;">{:__("乙方")}</span></b>
                <br/>
                <br/>
                <b><span >{:__("盖章签名")}：_____________</span></b>
                <br/>
                <br/>
                <b><span >{:__("日期")}：</span></b>
            </p>
        </td>
    </tr>

    </tbody>

</table>
<br/>
<br/>
<br/>

